<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" />
    <link rel="stylesheet" th:href="@{/user/moban/css/index.css}" />
    <link rel="stylesheet" th:href="@{/user/moban/css/table.css}" />
	<script th:src="@{/user/moban/js/jquery-1.11.2.min.js}"></script>
	<script th:src="@{/user/moban/js/main.js}"></script>
	<title>我的订单</title>
</head>
<style>
	.help-main p {
		line-height: 50px;
	}
</style>
<body>

<div>
<div class="top" id="item4">
	<div th:if="${user} ne null">
		<div class="container clearfix">
			<ul class="clearfix fr">
				<li>
					<a id="userN"><b th:text="${user.name}"></b></a></li>
				<li>
					<a th:href="@{/user/logout}">退出登录</a>
				</li>
				<li><a style="border: none" th:href="@{/order/findAll}">个人中心</a></li>
			</ul>
		</div>
	</div>
	<div th:if="${user} eq null">
		<div class="container clearfix">
			<ul class="clearfix fr">
				<li><a href="/user/join.html" tppabs="http://47.106.68.49:8066/join">登录</a></li>
			</ul>
		</div>
	</div>
</div>

<div class="header">
	<div class="container clearfix">
		<div class="logo fl">
			<a href="/user/index"><img alt="" th:src="@{/user/moban/images/logo.jpg}" /></a>
		</div>
		<div class="mm fr clearfix">
			<a th:href="@{/park/find}">查车位</a>
		</div>
	</div>
</div>
</div>

<div class="help-wrap">
	<div class="container clearfix">
		<div class="bread">当前位置：
			<a th:href="@{/user/index}">首页</a> >
			<a th:href="@{/order/findAll}">订单管理</a> >
			<a th:href="@{/order/findAll}">我的订单</a>
		</div>
		<div>
	<div class="help-l fl">
			<div class="help-item">
				<div class="help-item-title">个人中心
					<a class="abs" href=""></a>
				</div>
				<div class="help-item-list">
					<ul>
						<li><a th:href="@{/user/person}">个人信息</a></li>
						<li><a th:href="@{/user/updatePass}">修改密码</a></li>
					</ul>
				</div>
			</div>
			<div class="help-item">
				<div class="help-item-title">订单管理
					<a class="abs" href="javascript:void(0)"></a>
				</div>
				<div class="help-item-list">
					<ul>
						<li><a th:href="@{/order/findAll}">我的订单</a></li>
					</ul>
				</div>
			</div>
			<div class="help-item">
				<div class="help-item-title">留言管理
					<a class="abs" href="javascript:void(0)"></a>
				</div>
				<div class="help-item-list">
					<ul>
						<li><a th:href="@{/message/myMessage}">我的留言</a></li>
					</ul>
				</div>
			</div>
		</div>
</div>
		<div class="help-r fr">
			<div class="help-item-title">已买车票</div>
			<div class="help-main">
				<table class="table table-hover">
				<thead>
					<tr>
			        <th>订单编号</th>
			        <th>下单时间</th>
			        <th>车牌号</th>
			        <th>车位编号</th>
			        <th>车位价格</th>
			        <th>应付金额</th>
			        <th>状态</th>
			        <th>操作</th>
			      </tr>

			      <tr th:each="order:${orders}">
				      <td th:text="${order.code}"></td>
				      <td th:text="${#dates.format(order.createDate,'yyyy-MM-dd')}"></td>
				      <td th:text="${order.plateNum}"></td>
				      <td th:text="${order.name}"></td>
				      <td th:text="${order.price}"></td>
				      <td th:text="${order.pay}"></td>
				      <td>
						  <div th:switch="${order.status}">
							<span th:case="1" style="color:green">订单完成</span>
				      		<span th:case="0" style="color:red">待付款</span>
						  </div>
					  </td>
					  <div th:switch="${order.status}">
						  <td th:case="0"><a th:href="@{/order/finish?code=}+${order.code}">结算</a></td>
						  <td th:case="1"><a th:href="@{/order/delete?code=}+${order.code}">删除</a></td>
					  </div>
				  </tr>
			</thead>
			</table>
			</div>
		</div>
	</div>
</div>

<div class="foot" style="background-color: #ebebeb">
	<div class="container">
		<div class="zhinan">
			<ul class="clearfix">
				<li class="item-li">关于我们
					<ul>
						<li><a href="#">联系我们</a></li>
						<li><a href="#">网站公告</a></li>
					</ul>
				</li>
				<li class="item-li">新手指南
					<ul>
						<li><a href="#">如何买票</a></li>
						<li><a th:href="@{/user/updatePass}">修改密码</a></li>
					</ul>
				</li>
				<li class="item-li">配送方式
					<ul>
						<li><a href="#">配送范围</a></li>
						<li><a href="#">配送时间</a></li>
					</ul>
				</li>
				<li class="item-li">售后服务
					<ul>
						<li><a href="#">退票申请</a></li>
						<li><a href="#">改签申请</a></li>
					</ul>
				</li>
			</ul>
		</div>
		<div class="line"></div>

		<div class="bottom">
			<p>友情链接：<a href="#"></a>&nbsp;&nbsp;<a href="www.baidu.com">百度</a></p>
			<p>本站所有信息均为用户自由发布，本站不对信息的真实性负任何责任，交易时请注意识别信息的真假如有网站内容侵害了您的权益请联系我们删除</p>
			<p>Copyright &copy;1956-2018 基于H5得汽车订票系统.</p></div>
		</div>
	</div>

</body></html>